<?
	include_once('global.php');
	if(isset($_REQUEST['IsPostBack']) && $_REQUEST['IsPostBack'] == 'False'){
		SetNewAccount($_REQUEST);
		$_REQUEST['IsPostBack'] = 'true';
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>New User Registration</title>
        <style type="text/css">
			div{
				text-align:center;
				background-color:#E8E8E8;
			}
			body{
				margin-left:20%;
				margin-right:20%;
			}
			form{
				text-align:center;
				display:block;
			}
			p{
				margin-top:10px;
				margin-bottom:10px;
			}
		</style>
    </head>
    
    <body background="../Admin/Images/saturnvalley.jpg" bgproperties="fixed">
    	<div style="margin-top:200px">
        	<div>
            	<h2 style="padding-top:10px; margin-bottom:0px">Welcome to Saturn Valley Gaming</h2>
                <p style="margin-top:0px; margin-bottom:0px">Please create an account:</p>
                <hr width="600px" style="margin-top:0px"/>
            </div>
            <div>
           		<form method="post">
                	<input type="hidden" name="IsPostBack" value="False" />
                	<div>
                    	<label>First Name:</label> <input type="text" name="FirstName" value="" />
                    </div>
                    <div style="padding-left:2px">
                    	<label>Last Name:</label> <input type="text" name="LastName" value="" />
                    </div>
                    <div style="padding-right:20px">
                    	<label>Email Address:</label> <input type="text" name="Email" value="" />
                    </div>
                    <div style="padding-left:8px">
                    	<label>Password:</label> <input type="password" name="Password" value="" />
                    </div>
                    <div style="padding-bottom:10px">
                    	<input type="submit" value="Register" />
                    </div>
                    <? if($_REQUEST['IsPostBack'] == 'true'){ ?>
						<div>
                        	<p>Welcome aboard <?=$_REQUEST['FirstName']?>, enjoy your shopping experience!</p>
                            <p style="padding-bottom:10px">Please Sign In <a href="login.php">here</a></p>
                        </div> 
                        <? $_REQUEST['IsPostBack'] = 'False'; ?>                       
                    <? } ?>
                </form>
                <div>
                	<a href="../main.php">Home Page</a>
                </div>
            </div>
        </div>
    </body>
</html>
